home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Periodicals / develop / develop Issue 15 / develop 15 code / Text To Speech media handler / Code / StdTTS.h < prev   
Encoding:
C/C++ Source or Header  |  1993-04-22  |  1.3 KB  |  46 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StdTTS.h
  3.  
  4.     Written by: Guillermo A. Ortiz Developer Technical Support
  5.  
  6.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #define stdTextToSpeechComponentType 'stts'
  11.  
  12. typedef long SpeechFlags;
  13. /* hide sliders */
  14. #define    ttsSupressPitch     1
  15. #define    ttsSupressRate         2
  16.  
  17. /* gender control for voices, the default is show all, three flags set is means all */
  18. #define ttsNeutralVoices    16
  19. #define ttsMaleVoices        32
  20. #define ttsFemaleVoices        64
  21. #define ttsUseDescription    128
  22.  
  23. /* this is called when sorting the voices to be displayed should     */
  24. /* return true if order has to be reversed and false otherwise         */
  25. typedef pascal Boolean (*TTSSortFilter)(VoiceDescription *voice1, VoiceDescription *voice2);
  26.  
  27. typedef struct StdTTSParams {
  28. SpeechFlags            flags;
  29. VoiceDescription    curVoice;
  30. Fixed                rate;        /* set to zero if default to be used */
  31. Fixed                pitch;        /* set to zero if default to be used */
  32. Fixed                modulation;    /* set to -1 if default to be used */
  33. char                *message;
  34. } StdTTSParams;
  35. typedef StdTTSParams *StdTTSParamsPtr,**StdTTSParamsHandle;
  36.  
  37.  
  38.  
  39. /* returns 1 if the user selected a voice different than the one it got,
  40.    0 otherwise.
  41. */
  42. pascal ComponentResult 
  43.          StdSpeechDialog(ComponentInstance ciTTS, StdTTSParamsPtr speechParams,Point *where)
  44.     = {0x2F3C,0x8,0x1,0x7000,0xA82A};
  45.  
  46.